<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/12/5 0005
  Time: 16:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String u=request.getParameter("username");
    String p=request.getParameter("pass");
    if(u.startsWith("java62")&&p.equals("123456")){
        //成功
        //session.setMaxInactiveInterval(20);
        session.setAttribute("USER_LOGIN",u);
        response.sendRedirect("welcome.jsp");
        return;
    }
   // out.print("错误的用户名或者密码");
    request.getRequestDispatcher("login.jsp").forward(request,response);
%>
</body>
</html>
